package com.gedidianli.springbootcommonsmapper.controller;


import com.gedidianli.springbootcommonsmapper.dao.PeopleDao;
import com.gedidianli.springbootcommonsmapper.entity.People;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/People")
public class PeolpleController {

    @Autowired
    private PeopleDao peopleDao;

    @GetMapping("/selectOne")
    public Map selectOne(String str1){

        HashMap<String,Object> map=new HashMap<>();
        People people = new People(null,null,null,"6000",null,null,null);
        People people1 = peopleDao.selectOne(people);

        System.out.println(people1+str1);

        map.put("lalala",people1+str1);

        return map;
    }


}
